import request from '@/utils/request'

// 查询设备注册用户列表
export function listPerson(query) {
  return request({
    url: '/tongban/person/list',
    method: 'get',
    params: query
  })
}

export function devolutionPerson(personId){
  return request({
    url: '/tongban/person/addPersonPc?personId=' + personId,
    method: 'get'
  })
}

// 查询设备注册用户详细
export function getPerson(personId) {
  return request({
    url: '/tongban/person/' + personId,
    method: 'get'
  })
}

// 新增设备注册用户
export function addPerson(data) {
  return request({
    url: '/tongban/person',
    method: 'post',
    data: data
  })
}

// 修改设备注册用户
export function updatePerson(data) {
  return request({
    url: '/tongban/person',
    method: 'put',
    data: data
  })
}

// 删除设备注册用户
export function delPerson(personId) {
  return request({
    url: '/tongban/person/' + personId,
    method: 'delete'
  })
}

// 导出设备注册用户
export function exportPerson(query) {
  return request({
    url: '/tongban/person/export',
    method: 'get',
    params: query
  })
}
